home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / multipik.zip / MULTIPIK.FRM (.txt) < prev    next >
Visual Basic Form  |  1991-10-15  |  6KB  |  121 lines

  1. MULTIPIK
  2. Trovadore's Home Trattoria
  3. Form1
  4. Label1
  5. ,Pick up to 5 of these mouth watering dishes:
  6.     DummyList
  7. System
  8. OKCancel
  9. System
  10. OKCancel
  11. &Cancel
  12. System
  13. iflag
  14. wMulPik
  15.     IDL_MPICK
  16. @    Form_Load
  17. TRUE<
  18. Form_Paint
  19. hInst
  20. GetWindowWord
  21. MULTIPIK
  22. GWW_HINSTANCE
  23. GetWindowRect
  24.     DummyListP
  25. GetFocus<
  26. Visible
  27. FALSEN
  28. GetSystemMetrics
  29. SM_CYCAPTION|
  30. nWidth
  31. right
  32. nHeight
  33. BOTTOM
  34. CreateWindowt
  35. LBS_MULTIPICK
  36. IDL_MPIK
  37. HideMe
  38. ShowWindow
  39. SendDlgItemMessage
  40. LB_ADDSTRING
  41. ShowMe
  42. OKCancel_Click
  43. Index
  44. Total
  45. LB_GETSELCOUNTW
  46. Count
  47. Choices
  48. LB_GETSELITEMS
  49. LB_GETTEXT
  50. Notice
  51. Thanks
  52. Caption
  53. SW_HIDE
  54. SW_SHOWJ
  55.  Feel free to use or modify MULTIPIK to suit your needss
  56.  Address questions/comments/improvements tot
  57.  Costas Kitsos, CIS ID: 73667,1755
  58.  Enjoy!
  59.  Flag used during the creation of the MultiPick ListBox_
  60.  Window handle for the MultiPick ListBox
  61.  We'll assing this ID number to the MultiPick ListBox. Since VB assignsU
  62.  ID numbers sequentially starting with 1, this number is high enough not
  63.  to cause conflicts with any Controls on our form.
  64. Form_Load
  65.  Set the flag to TRUE to inform Form_Paint to create the MultiPick ListBox
  66. Form_Paint
  67.  Get the Instance handle to MULTIPIK.  We need this for the 
  68.  CreateWindow function.e
  69.  Get the dimensions of the formT
  70.  Get the dimensions of the Dummy ListBox  
  71.  Calculate the size and placement of the MultiPick ListBox based
  72.  on the size and placement of the Form and the Dummy ListBox.s
  73.  Create the MultiPick ListBox
  74.  lpClassName: we'll use the LISTBOX classd
  75.  lpWindowName: is irrelevant hereO
  76.  dwStyle: the MultiPick styleh
  77.  X, Y, nWidth, nHeight: size and placement of the MultiPick ListBoxL
  78.  hWndParent: this would be our MULTIPIK hWnd
  79.  hMenu: would be IDL_MPICK
  80.  hInstance: we've already determined thatW
  81.  lpParam: is irrelevant here
  82. LISTBOX"
  83.  hide the MultiPick ListBox we've just created so the screen doesn't
  84.  flicker when we add our items
  85.  Add the items to the ListBoxs
  86. Linguine with Italian Sausage and Green Peppers" 
  87. Capellini with Shitake Mushrooms in Cream Sauce  
  88. Spinach Fettucine with Zucchini and Pesto Sauce" 
  89. Rigatoni with Shrimp Areganata 
  90. Vermicelli with Sun Dried Tomatoes 
  91. Veal Marsala with Prosciutto Ham 
  92. Linguine Carbonara Con Pancetta" 
  93. Grilled Salmon in Tomato-Taragon Butter" 
  94. Linguine with Fresh Clams and Scallions" 
  95. Homemade Lasagna Fiorentina" 
  96. Penne with Asparagus and Italian Bacon 
  97. Rosemary Chicken with Japanese Eggplant" 
  98. Angel Hair with Sun Dried Tomatoes Concasse" 
  99. Three Citrus Grilled Chicken 
  100. Shrimp Scampi and Penne Possilippo 
  101. Veal Vesuvio with Fresh Vegetables 
  102. Capellini Calamari tossed in Garlic Oil" 
  103. Chicken Marsala" 
  104. Tagliatelle with Veal in Sesame Sauce" 
  105. Linguine with Fresh Vegetables Con Primavera 
  106. Fettucine Alfredo" 
  107. Spaghetti Aglio e Olio 
  108.  Show the MultiPick ListBox 
  109.  Set the flag to FALSE so we don't go through this again
  110. OKCancel_Click
  111.  If the user pressed ENTER or clicked on OK, get the total items picked
  112.  For the purposes of this demo let's limit the total to 5l
  113.  Dimension an Array of Integer to hold the indices of the items picked
  114.  Dimension a String Array to hold the selected items
  115.  Get the selections from the MultiPick ListBox, and copy themm
  116.  to the Dish Array removing ASCII 0s.k
  117.  Prove that it worked
  118. Thank you for preferring Trovadore's!"
  119.  We're done
  120.  If the user chose Cancel or pressed ESCAPE, exit"
  121.